package com.sxmsy.factory1;

/**
 * 简单工厂
 * 缺点：增加模式就要修改
 */
public class ProductFactory {

  public static IProduct createProductFactory(String payType){
    if("BIKE".equalsIgnoreCase(payType)){
      return new Bike();
    }else if("CAR".equalsIgnoreCase(payType)){
      return new Car();
    }
   return null;
  }
}
